# Contributor: David Demelier <markand@malikania.fr>
# Maintainer: David Demelier <markand@malikania.fr>
pkgname=zita-resampler
pkgver=1.6.2
pkgrel=0
pkgdesc="library for resampling audio signals"
url="https://kokkinizita.linuxaudio.org/linuxaudio"
arch="all"
license="GPL-3.0-only"
makedepends="libsndfile-dev"
subpackages="$pkgname-dev $pkgname-doc"
source="https://kokkinizita.linuxaudio.org/linuxaudio/downloads/zita-resampler-$pkgver.tar.bz2
	patch-Makefile.patch"
options="!check" # No tests

build() {
	make -C source
	# Poorly written makefile that may only build apps if the library
	# is installed system wide. Fake it locally.
	ln -sv lib$pkgname.so.$pkgver source/lib$pkgname.so
	make CXXFLAGS="-I../source $CXXFLAGS" LDFLAGS="-L../source $LDFLAGS" -C apps
}

package() {
	make PREFIX=/usr LIBDIR=/usr/lib DESTDIR="$pkgdir" -C source install
	make PREFIX=/usr LIBDIR=/usr/lib DESTDIR="$pkgdir" -C apps install
}

sha512sums="d547419dd222c8a399d8f196efa1ec88a3f781275b696ae2fe1bb6e2fc329285affb8aace85972c304ad256becc4a155534dd5ef4ce3c57cbc9dcca0122b670c  zita-resampler-1.6.2.tar.bz2
2b69d34c768465ac92a3f6e3fbccb89099b221c097c22323f10b6db0a7d8941d805dc1869f51d172bfe0e86ce53e0f112c5cce9647f24795c1faa09573b1531d  patch-Makefile.patch"
